﻿<%@ Page Language="C#" MasterPageFile="~/admin/Admin.Master" AutoEventWireup="true" CodeBehind="IconAE.aspx.cs" Inherits="CMS.admin.IconAE" Title="Hệ thống quản trị nội dung - quản lý banner" %>
<%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script language="javascript">        
        function call176()  
        {  
		    var editor1 = document.getElementById('<%=editor176.ClientID%>');
            editor1.FocusDocument();  
            var editdoc = editor1.GetDocument();  
            editor1.ExecCommand('new');
            editor1.ExecCommand('ImageGalleryByBrowsing');
            InputURL176();
        }    
        
        function InputURL176()
        { 
		    var editor1 = document.getElementById('<%=editor176.ClientID%>');
            var editdoc = editor1.GetDocument();  
            var imgs = editdoc.images;
            if(imgs.length>0)  
            {	
                var filepath = imgs[imgs.length-1].src;
                var filename = filepath.substring(filepath.lastIndexOf("/uploads/")+9,filepath.length);
                document.getElementById("<%=txt176.ClientID%>").value = filename;
                document.getElementById("<%=img176.ClientID%>").src = filepath; 
            }  
            else
            {
			    setTimeout(InputURL176,500); 
            }  
        }    
                                 
    </script>

    <div style="border: solid 1px #ccc;">
        <div id="toolbox">
            <div class="header" style="float: left; margin-left: -40px;">
                <img src="../images/Toolbox/title-article.png" alt="" id="imgHeader" />
                Quản lý Icon Index: thêm/sửa
            </div>
            <div style="float: right;">
                <table class="toolbar">
                    <tr>
                        <td align="center">
                            <asp:LinkButton ID="btnUpdate" runat="server" OnClick="btnUpdate_Click">
                                <asp:Label ID="Label1" CssClass="Icon-32-Save" runat="server" />
                                Cập nhật
                            </asp:LinkButton>
                        </td>
                        <td align="center">
                            <asp:LinkButton ID="btnClose" CausesValidation="false" runat="server" OnClick="btnClose_Click">
                                <asp:Label ID="Label4" CssClass="Icon-32-Cancel" runat="server" />
                                Đóng lại
                            </asp:LinkButton>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
    <p align="center">
        <asp:Label ID="lblMessage" runat="server" BackColor="White" BorderColor="White" ForeColor="Red"></asp:Label>
    </p>
    <div id="content-box">
        <div class="t">
            <div class="t">
                <div class="t">
                </div>
            </div>
        </div>
        <div class="m">
            <!--table2:data form-->
            <table width="830" cellpadding="5" border="0" cellspacing="5">
                <tr>
                    <td align="right" style="width: 112px">
                        <asp:Label ID="lblCategory" runat="server" Text="Tên Icon:"></asp:Label>
                        <asp:Label ID="Label7" runat="server" ForeColor="Red" Text="*"></asp:Label></td>
                    <td style="text-align: left">
                        <asp:TextBox MaxLength="150" ID="txtTitle" runat="server" Width="213px"></asp:TextBox>
                        &nbsp;&nbsp;
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtTitle"
                            ErrorMessage="(*)"></asp:RequiredFieldValidator>
                        <asp:CheckBox ID="chkActive" runat="server" Text="Kích hoạt" /></td>
                </tr>
                <tr valign="top">
                    <td align="right" style="width: 112px">
                        <asp:Label ID="Label3" runat="server" Text="Hình ảnh:"></asp:Label>
                    </td>
                    <td style="text-align: left">
                        <asp:TextBox MaxLength="250" ID="txt176" runat="server" Width="413px"></asp:TextBox>
                        &nbsp;&nbsp;<input type="Button" id="btnAnhtin" onclick="call176()" value="Chọn ảnh" />
                    </td>
                </tr> 
                <tr valign="top">
                    <td align="right" style="width: 112px">
                        
                    </td>
                    <td style="text-align: left">                        
                        <img id="img176" src="/images/banner_noimage.jpg" runat="server" border="0" />
                    </td>
                </tr> 
                <tr>
                    <td colspan="2" style="text-align: center">
                        <CE:Editor ID="editor176" FilesPath="" EnableObjectResizing="false" BorderColor="white"
                            runat="server" Width="1px" Height="1px" AutoConfigure="None" ShowHtmlMode="False"
                            ShowPreviewMode="False" EnableContextMenu="false" ShowGroupMenuImage="False"
                            ShowBottomBar="False" BackColor="White">
                            <FrameStyle BackColor="White" BorderColor="#DDDDDD" BorderStyle="Solid" BorderWidth="1px"
                                CssClass="CuteEditorFrame" Height="100%" Width="100%" />
                        </CE:Editor>
                        <CE:Editor ID="editor240" FilesPath="" EnableObjectResizing="false" BorderColor="white"
                            runat="server" Width="1px" Height="1px" AutoConfigure="None" ShowHtmlMode="False"
                            ShowPreviewMode="False" EnableContextMenu="false" ShowGroupMenuImage="False"
                            ShowBottomBar="False" BackColor="White">
                            <FrameStyle BackColor="White" BorderColor="#DDDDDD" BorderStyle="Solid" BorderWidth="1px"
                                CssClass="CuteEditorFrame" Height="100%" Width="100%" />
                        </CE:Editor>
                        <CE:Editor ID="editor320" FilesPath="" EnableObjectResizing="false" BorderColor="white"
                            runat="server" Width="1px" Height="1px" AutoConfigure="None" ShowHtmlMode="False"
                            ShowPreviewMode="False" EnableContextMenu="false" ShowGroupMenuImage="False"
                            ShowBottomBar="False" BackColor="White">
                            <FrameStyle BackColor="White" BorderColor="#DDDDDD" BorderStyle="Solid" BorderWidth="1px"
                                CssClass="CuteEditorFrame" Height="100%" Width="100%" />
                        </CE:Editor>    
                        <CE:Editor ID="editor480" FilesPath="" EnableObjectResizing="false" BorderColor="white"
                            runat="server" Width="1px" Height="1px" AutoConfigure="None" ShowHtmlMode="False"
                            ShowPreviewMode="False" EnableContextMenu="false" ShowGroupMenuImage="False"
                            ShowBottomBar="False" BackColor="White">
                            <FrameStyle BackColor="White" BorderColor="#DDDDDD" BorderStyle="Solid" BorderWidth="1px"
                                CssClass="CuteEditorFrame" Height="100%" Width="100%" />
                        </CE:Editor>                                                
                    </td>
                </tr>
            </table>
            <!--end:table2-->
            <div class="clr">
            </div>
        </div>
        <div class="b">
            <div class="b">
                <div class="b">
                </div>
            </div>
        </div>
    </div>
</asp:Content>
